import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { ApEphService } from './ap_eph.service';

@Controller('ap/eph')
export class ApEphController {
  constructor(private readonly apEphService: ApEphService) {}

  @Post("ephemeris_get")
  ephemeris_get() {
    return this.apEphService.ephemeris_get();
  }

  @Post('ephemeris_cal')
  ephemeris_cal(@Body() body: any) {
    return this.apEphService.ephemeris_cal(body);
  }

  @Post('ephemeris_set')
  ephemeris_set(@Body() body: any) {
    return this.apEphService.ephemeris_set(body);
  }

  // 删除星历
  @Post('ephemeris_config_del')
  ephemeris_delete(@Body("id") id: number) {
    return this.apEphService.ephemeris_delete(id);
  }

  @Post('ephemeris_record')
  ephemeris_record() {
    return this.apEphService.ephemeris_record();
  }

  @Post('ephemeris_ctrl')
  ephemeris_ctrl(@Body() body: any) {
    return this.apEphService.ephemeris_ctrl(body);
  }


  //12根星历获取
  @Post('ephemeris_tlw_get')
  twelve_ephemeris_get() {
    return this.apEphService.twelve_ephemeris_get();
  }

  //设置sib2
  @Post('sib2_set')
  sib2_set(@Body() body: any) {
    return this.apEphService.sib2_set(body);
  }

  //获取sib2
  @Post('sib2_get')
  sib2_get() {
    return this.apEphService.sib2_get();
  }
  

  //12根星历保存
  @Post('/ephemeris_tlw_set')
  ephemeris_tlw_set(@Body() body: any) {
    return this.apEphService.ephemeris_tlw_set(body);
  }
  
}
